//
//  PBSettingCollectionViewCell.m
//  PBHomeDemo
//
//  Created by Playboy on 2018/1/6.
//  Copyright © 2018年 tmkj. All rights reserved.
//

#import "PBSettingCollectionViewCell.h"

@interface PBSettingCollectionViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UIImageView *coverImageView;
@property (nonatomic, strong) NSArray *nameArray;
@end

@implementation PBSettingCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.nameArray = @[@"床",@"热水器",@"空调",@"吸尘器",@"衣柜",@"洗衣机",@"微波炉",@"宽带"];
}

- (void)refreshWithHouseInfo:(NSDictionary *)houseInfo indexPath:(NSIndexPath *)indexPath{
    
//    for (NSInteger i = 0 ; i < houseInfo.count; i ++) {
//        if ([[houseInfo allKeys][i] isEqualToString:@"bed"]) {
//            self.nameLabel.text = @"床";
//        }else if ([[houseInfo allKeys][i] isEqualToString:@"washwheel"]) {
//            self.nameLabel.text = @"衣柜";
//        }else if ([[houseInfo allKeys][i] isEqualToString:@"airCondition"]) {
//            self.nameLabel.text = @"空调";
//        }else if ([[houseInfo allKeys][i] isEqualToString:@"microwaveOven"]) {
//            self.nameLabel.text = @"微波炉";
//        }else if ([[houseInfo allKeys][i] isEqualToString:@"heater"]) {
//            self.nameLabel.text = @"加热器";
//        }
//    }
    
    self.nameLabel.text = [houseInfo allKeys][indexPath.row];
    self.coverImageView.image = [UIImage imageNamed:[houseInfo allKeys][indexPath.row]];
//    if ([houseInfo[@"bed"] integerValue] == 1) {
//        self.nameLabel.text = @"床";
//    }else if ([houseInfo[@"heater"] integerValue] == 1) {
//
//    }
}

@end
